package wuji.demospringclouduserconsumer.service;


import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import wuji.demospringclouduserconsumer.hystrix.UserServiceHystrix;
import wuji.pojo.User;


import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@FeignClient(name="springcloud-demo-user-provider", fallback = UserServiceHystrix.class)
public interface UserServiceFeign {

    @RequestMapping("/login")
    public User login(@RequestParam(name = "username") String username, @RequestParam(name = "password") String password) ;

    @RequestMapping("/user/userList")
    public List<User> userList();

}
